

            function addArduinoCod (Blockly) {
            
                        

                        
        Blockly.Arduino['EXT_RGB_COLORFUL_LAMPS_BLOCK_1607484034981'] = function(block)
        {
            let r_pin = this.getFieldValue('r_pin');
let g_pin = this.getFieldValue('g_pin');
let b_pin = this.getFieldValue('b_pin');
let R =  Blockly.Arduino.valueToCode(this, 'R', Blockly.Arduino.ORDER_ATOMIC);
let G =  Blockly.Arduino.valueToCode(this, 'G', Blockly.Arduino.ORDER_ATOMIC);
let B =  Blockly.Arduino.valueToCode(this, 'B', Blockly.Arduino.ORDER_ATOMIC);
          
            Blockly.Arduino.definitions_['include_EXT_RGB_COLORFUL_LAMPS_BLOCK_1607484034981'] = ``;
            Blockly.Arduino.definitions_['define_EXT_RGB_COLORFUL_LAMPS_BLOCK_1607484034981'] = `#define RGB_RED    ${r_pin}\r\n#define RGB_GREEN    ${g_pin}\r\n#define RGB_BLUE    ${b_pin}`;
            Blockly.Arduino.definitions_['setup_EXT_RGB_COLORFUL_LAMPS_BLOCK_1607484034981'] = `pinMode(RGB_RED, OUTPUT);\r\n  pinMode(RGB_GREEN, OUTPUT);\r\n  pinMode(RGB_BLUE, OUTPUT);`;
             return  `analogWrite(RGB_RED, ${R});\r\nanalogWrite(RGB_GREEN, ${G});\r\nanalogWrite(RGB_BLUE, ${B});\r\n`;
        }
                    
            return Blockly;
            }

            module.exports = addArduinoCod ;

        